Add test to validate examples in the main PALS repository#55
Add test to validate examples in the main PALS repository#55EZoni wants to merge 23 commits intopals-project:mainfrom
Conversation
c78a626 to
085fc2c
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
- Copy implementation from BeamLine to Lattice - Move methods from_file, to_file from BeamLine to Lattice - Use new class in external examples test script
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
f547269 to
0a9732d
Compare
bc42b84 to
b95a0d8
Compare
b95a0d8 to
0e9b38d
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds validation testing for examples in the upstream PALS repository to ensure consistency between the Python implementation and the official examples. The PR refactors the existing CI workflow into three separate workflows (unit tests, local examples, and upstream examples) and adds support for a new - use: element_name syntax for referencing elements in YAML files.
Changes:
- Split monolithic CI workflow into three separate workflows for better organization
- Added new upstream examples validation workflow that clones and tests examples from the main PALS repository
- Added support for
- use: element_namesyntax as an alternative to plain string element references
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_upstream_examples.py | New test script to validate upstream PALS examples by loading and parsing them |
| src/pals/kinds/mixin/all_element_mixin.py | Added handling for - use: element_name syntax to support upstream examples |
| .github/workflows/upstream_examples.yml | New workflow to test upstream PALS repository examples |
| .github/workflows/unit_tests.yml | Refactored workflow focusing only on pytest unit tests |
| .github/workflows/local_examples.yml | Refactored workflow focusing only on local example scripts |
Comments suppressed due to low confidence (1)
.github/workflows/local_examples.yml:19
- Python 3.14 is included in the test matrix, but as of February 2026, Python 3.14 has not been officially released yet (the latest stable release is Python 3.13). This will cause the GitHub Actions workflow to fail when trying to set up this Python version. Consider removing "3.14" from the matrix until it's officially available, or use the 3.14-dev version explicitly if you want to test against development builds.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| concurrency: | ||
| group: ${{ github.ref }}-${{ github.head_ref }}-pals-python | ||
| group: ${{ github.ref }}-${{ github.head_ref }}-local-examples |
There was a problem hiding this comment.
I think the name local is confusing.
Maybe inrepo vs standard/upstream repo?
There was a problem hiding this comment.
I had done some brainstorming on this and came up with the pair local/upstream, but let's revisit as you suggest.
Regarding inrepo, I would prefer to use a real single word (rather than a "crasis" of two words), if possible.
I propose some alternative pairs here, let me know if you like any of these:
repo/standardrepo/referenceimplementation/standardimplementation/reference
The rationale behind implementation being that these are the examples shipped with the Python implementation of the standard, rather than the examples shipped with the standard itself.
There was a problem hiding this comment.
Maybe just examples?
This refers to the local repo anyway by default and the other one is "standard/online examples"?
ax3l
left a comment
There was a problem hiding this comment.
This looks great!
Just three small comments to make sure this is well-named and a bit more documented.
Overview
This PR adds to the main CI workflow a new step that tests the examples in the main PALS repository.
The test goes as follows:
This makes sure that the Python implementation is actually consistent with the examples in the main PALS repository.
The examples within the PALS Python repository are labeled "internal", while the ones within the main PALS repository are labeld "upstream".
To do
PlaceholderName#60 and rebase.